package pro.cherish.smartfile.config.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.stereotype.Component;

/**
 * web容器初始化
 */
@Slf4j
@Component
public class WebServerInitializedListener implements ApplicationListener<WebServerInitializedEvent> {
	@Override
	public void onApplicationEvent(WebServerInitializedEvent event) {
		ConfigurableEnvironment environment = (ConfigurableEnvironment) event.getApplicationContext().getEnvironment();
		log.info("web容器初始化完成");
	}

}
